package com.smarttourism.service.impl;

import java.util.List;
import com.smarttourism.common.utils.DateUtils;
import com.smarttourism.domain.Member2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.smarttourism.mapper.RefillMapper;
import com.smarttourism.domain.Refill;
import com.smarttourism.service.IRefillService;

/**
 * 充值记录Service业务层处理
 * 
 * @author smarttourism
 * @date 2024-10-23
 */
@Service
public class RefillServiceImpl implements IRefillService 
{
    @Autowired
    private RefillMapper refillMapper;

    /**
     * 查询充值记录
     * 
     * @param id 充值记录主键
     * @return 充值记录
     */
    @Override
    public Refill selectRefillById(Long id)
    {
        return refillMapper.selectRefillById(id);
    }

    /**
     * 查询充值记录列表
     * 
     * @param refill 充值记录
     * @return 充值记录
     */
    @Override
    public List<Refill> selectRefillList(Refill refill)
    {
        return refillMapper.selectRefillList(refill);
    }

    /**
     * 新增充值记录
     * 
     * @param refill 充值记录
     * @return 结果
     */
    @Override
    public int insertRefill(Refill refill)
    {
        refill.setCreateTime(DateUtils.getNowDate());
        return refillMapper.insertRefill(refill);
    }

    /**
     * 修改充值记录
     * 
     * @param refill 充值记录
     * @return 结果
     */
    @Override
    public int updateRefill(Refill refill)
    {
        return refillMapper.updateRefill(refill);
    }

    /**
     * 批量删除充值记录
     * 
     * @param ids 需要删除的充值记录主键
     * @return 结果
     */
    @Override
    public int deleteRefillByIds(Long[] ids)
    {
        return refillMapper.deleteRefillByIds(ids);
    }

    /**
     * 删除充值记录信息
     * 
     * @param id 充值记录主键
     * @return 结果
     */
    @Override
    public int deleteRefillById(Long id)
    {
        return refillMapper.deleteRefillById(id);
    }
}
